#ifndef __stopwatch_h
#define __stopwatch_h

#include <time.h>
class stopwatch {
		time_t valstart,valstop;
		time_t getcurrent() {
			return time(NULL);
		}
	public:
		void start() {
			valstart=getcurrent();
		}
		void stop() {
			valstop=getcurrent();
		}
		double reading() {
			return difftime(valstop,valstart);
		}
};
#endif
